  <table>
    <tr>
      <td height="60"><h1>基本属性</h1></td>
    </tr>
    <tr>
      <td>
        <table class="TwoSide">
          <tr>
             <td width="20%"><span>*</span>所属父栏目</td>
             <td>
               <select name="upid">
                 <option value="<!--{$T.upCategory.categoryid}!-->"><!--{$T.upCategory.name}!--></option>
               </select>
             </td>
          </tr>
          <tr>
             <td><span>*</span>栏目名称</td>
             <td><input type="text" name="name" size="60" value="<!--{$T.category.name}!-->"></td>
          </tr>
          <tr>
             <td><span></span>栏目别名</td>
             <td><input type="text" name="bname" size="60" value="<!--{$T.category.bname}!-->"></td>
          </tr>
          <!--{if !$T.category.categoryid}!-->
          <tr>
             <td><span>*</span>是否为终极栏目</td>
             <td><input type="checkbox" name="isLast" onclick="CateGoryTypeChange(this);"/>是<span>(终极栏目才能添加信息)</span></td>
          </tr>
          <!--{else}!-->
          <tr>
             <td><span>*</span>是否为终极栏目</td>
             <td><input type="checkbox" name="isLast" disabled="false" <!--{if $T.category.islast==1}!--> checked <!--{/if}!-->onclick="CateGoryTypeChange(this);"/>是<span>(终极栏目才能添加信息)</span>
             <input type="hidden" name="isLast" value="<!--{$T.category.islast}!-->">
             </td>
          </tr>
          <!--{/if}!-->
          <!--{if !$T.category.categoryid}!-->
          <tr>
             <td><span>*</span>访问路径</td>
             <td>
                /<!--{$T.upCategory.path}!--><input type="text" name="path" size="20">
                <input type="hidden" name="upCategoryPath" value="<!--{$T.upCategory.path}!-->" />
             </td>
          </tr>
          <!--{else}!-->
          <tr>
             <td><span>*</span>访问路径</td>
             <td>
                /<input type="text" name="path" size="20"  readonly="true" value="<!--{$T.category.path}!-->" >
             </td>
          </tr>
          <!--{/if}!-->
          <tr>
             <td><span>*</span>系统模型</td>
             <td>
               <select name="mid">
			   <!--{section name=list loop=$T.models}!-->
                 <option value="<!--{$T.models[list].mid}!-->" <!--{if $T.category.mid==$T.models[list].mid}!--> selected <!--{/if}!-->>
				   <!--{$T.models[list].alias}!-->
				 </option>
			   <!--{/section}!-->
               </select>
             </td>
          </tr>
          <tr>
             <td><span></span>标题图片</td>
             <td>
               <input type="file" name="titleFile">
             </td>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td height="60"><h1>模版组选项</h1></td>
    </tr>
    <tr>
      <td>
        <table class="TwoSide">
           <tr>
             <td width="20%"><span></span>头部模版组</td>
             <td>
               <select name="headerTempGroup">
                <!--{section name=list loop=$T.headerGroups}!-->
                 <option value="<!--{$T.headerGroups[list].groupid}!-->" <!--{if $T.category.header_groupid==$T.headerGroups[list].groupid}!--> selected <!--{/if}!-->>
                  <!--{$T.headerGroups[list].name}!-->
                 </option>
                <!--{/section}!-->
               </select>
             </td>
          </tr>
          <tr>
             <td><span></span>尾部模版组</td>
             <td>
               <select name="footerTempGroup">
                <!--{section name=list loop=$T.footerGroups}!-->
                 <option value="<!--{$T.footerGroups[list].groupid}!-->" <!--{if $T.category.footer_groupid==$T.footerGroups[list].groupid}!--> selected <!--{/if}!-->>
                 <!--{$T.footerGroups[list].name}!-->
                 </option>
                <!--{/section}!-->
               </select>
             </td>
          </tr>
          <tr class="noLastCategoryTempGroupSet" <!--{if $T.category.islast}!--> style="display:none;" <!--{/if}!-->>
             <td><span></span>栏目模版组</td>
             <td>
               <select name="categoryTempGroup">
                <!--{section name=list loop=$T.categoryGroups}!-->
                 <option value="<!--{$T.categoryGroups[list].groupid}!-->" <!--{if $T.category.category_groupid==$T.categoryGroups[list].groupid}!--> selected <!--{/if}!-->>
                 <!--{$T.categoryGroups[list].name}!-->
                 </option>
                <!--{/section}!-->
               </select>
             </td>
          </tr>
          <tr class="lastCategoryTempGroupSet" <!--{if !$T.category.islast}!--> style="display:none;" <!--{/if}!-->>
            <td><span></span>列表模版组</td>
            <td>
              <select name="listTempGroup">
                <!--{section name=list loop=$T.listGroups}!-->
                 <option value="<!--{$T.listGroups[list].groupid}!-->" <!--{if $T.category.list_groupid==$T.listGroups[list].groupid}!--> selected <!--{/if}!-->>
                 <!--{$T.listGroups[list].name}!-->
                 </option>
                <!--{/section}!-->
              </select>
            </td>
          </tr>
          <tr class="lastCategoryTempGroupSet" <!--{if !$T.category.islast}!--> style="display:none;" <!--{/if}!-->>
            <td><span></span>内容模版组</td>
            <td>
              <select name="infoTempGroup">
                <!--{section name=list loop=$T.infoGroups}!-->
                 <option value="<!--{$T.infoGroups[list].groupid}!-->" <!--{if $T.category.info_groupid==$T.infoGroups[list].groupid}!--> selected <!--{/if}!-->>
                 <!--{$T.infoGroups[list].name}!-->
                 </option>
                <!--{/section}!-->
              </select>
            </td>
          </tr>
        </table>
      </td>
     </tr>
     <tr>
      <td height="60"><h1>高级选项</h1></td>
    </tr>
    <tr>
      <td>
        <table class="TwoSide">
          <tr>
             <td width="20%"><span></span>是否隐藏</td>
             <td>
               <input type="radio" name="isHidden" value="0"  <!--{if !$T.category.hide}!-->  checked="checked" <!--{/if}!-->/>不隐藏
               <input type="radio" name="isHidden" value="1"  <!--{if $T.category.hide}!-->  checked="checked" <!--{/if}!-->/>隐藏
             </td>
          </tr>
          <tr>
             <td width="20%"><span></span>显示排序</td>
             <td><input type="text" name="myOrder" size="15" value="<!--{$T.category.myorder}!--><!--{$T.myOrder}!-->" />(值越小越前面)</td>
          </tr>
          <tr>
             <td><span></span>开放投稿</td>
             <td>
               <input type="radio" name="openAdd" value="0" <!--{if !$T.category.openadd}!--> checked="checked" <!--{/if}!-->/>关闭
               <input type="radio" name="openAdd" value="1" <!--{if  $T.category.openadd}!--> checked="checked" <!--{/if}!-->/>开放
             </td>
          </tr>
        </table>
      </td>
     </tr>
     <tr>
      <td height="60"><h1>生成选项</h1></td>
    </tr>
    <tr>
      <td>
        <table class="TwoSide">
          <tr>
             <td><span></span>管理排序</td>
             <td>
                <input type="text" size="30" id="adminOrder" name="adminOrder" value="<!--{$T.category.adminorder}!--><!--{$T.adminOrder}!-->">
                <select id="orderBy1" onchange="OrderChange(this,'adminOrder')">
                  <option value="id" selected="selected">按ID降序</option>
                  <option value="time">按发布时间降序</option>
                  <option value="id">按点击率降序</option>
                  <option value="id">按下载数降序</option>
                  <option value="id">按评论次数降序</option>
                </select>
             </td>
          </tr>
          <tr>
             <td><span></span>生成排序</td>
             <td>
                <input type="text" size="30" id="infoOrder" name="infoOrder" value="<!--{$T.category.infoorder}!--><!--{$T.infoOrder}!-->">
                <select id="orderBy2" onchange="OrderChange(this,'infoOrder')">
                  <option value="id">按ID降序</option>
                  <option value="time" selected="selected">按发布时间降序</option>
                  <option value="id">按点击率降序</option>
                  <option value="id">按下载数降序</option>
                  <option value="id">按评论次数降序</option>
                </select>
             </td>
          </tr>
          <tr>
             <td><span></span>每页显示</td>
             <td><input type="text" name="infoNum" size="30"  value="<!--{$T.category.infonum}!--><!--{$T.infoNum}!-->">条记录</td>
          </tr>
        </table>
      </td>
    </tr>
      </td>
    </tr>
  </table>
 
 <script language="javascript">
    function CateGoryTypeChange(object){
		if(object.checked){
		   $(".noLastCategoryTempGroupSet").css("display", "none");
		   $(".lastCategoryTempGroupSet").slideDown(1000);
		   
		}
		else{
		   $(".noLastCategoryTempGroupSet").slideDown(1000);
		   $(".lastCategoryTempGroupSet").css("display", "none");
		}
	}
	function OrderChange(object,orderMethod){  //排序方式改变时
		var value;
		switch(object.value){
			case "id":value="id DESC";break;
			case "time":value="newstime DESC";break;
		}
		$("#"+orderMethod).val(value);
	}
 </script>